export function getAddOption(e, eDate) {
  // console.log(eDate)
  e = [630, 1696, 2414, 2419, 2495, 3025]
  const option = {
    title: {
      text: '全国志愿活动数量统计图',
      subtext: '',
      left: 'center',
      top: '10',
      textStyle: {
        color: '#fff'
      }
    },
    grid: {
      left: '15%'
    },
    xAxis: {
      type: 'category',
      axisLine: {
        lineStyle: {
          color: '#FFFFFF'
        }
      },
      data: eDate
    },
    yAxis: {
      type: 'value',
      splitLine: {
        show: true,
        lineStyle: {
          color: ['#398cff', '#63f8ed']
        }
      },
      axisLine: {
        lineStyle: {
          color: '#FFFFFF'
        }
      }
    },
    series: [{
      data: e,
      type: 'line',
      smooth: true
    }]
  }
  return option
}
export function setData(edata) {

}
export function getTdpjOption(edata) {
  const option = {
    color: ['#194f97', '#f19272', '#c82d31', '#898989', '#bd6b08', '#625ba1', '#898989', '#9c9800', '#00686b', '#a195c5', '#103667', '#f19272'],
    title: {
      top: 15,
      text: '中小企业数智生态报告'
    },
    tooltip: {
      trigger: 'item',
      formatter: '{a} <br/>{b} : {c}%'
    },
    // toolbox: {
    //   feature: {
    //     dataView: { readOnly: false },
    //     restore: {},
    //     saveAsImage: {}
    //   }
    // },
    legend: {
      top: 310,
      left: 10,
      data: ['创新企业', '专精特新', '专精特新小巨人']
    },
    series: [
      {
        name: '测评结果',
        type: 'funnel',
        left: '10%',
        top: 60,
        bottom: 60,
        width: '80%',
        min: 0,
        max: 100,
        minSize: '0%',
        maxSize: '100%',
        sort: 'ascending',
        gap: 2,
        label: {
          show: true,
          position: 'inside',
          formatter: function(data) {
            return data.data.cs
          }
        },
        labelLine: {
          length: 10,
          lineStyle: {
            width: 1,
            type: 'solid'
          }
        },
        itemStyle: {
          borderColor: '#fff',
          borderWidth: 1
        },
        emphasis: {
          label: {
            fontSize: 20
          }
        },
        data: [
          { value: 90, name: '创新企业',
            tooltip: {
              trigger: 'item',
              formatter: '{a} <br/>{b} : 不符合'
            }, cs: '不符合'
          },
          { value: 60, name: '专精特新',
            tooltip: {
              trigger: 'item',
              formatter: '{a} <br/>{b} : 不符合'
            }, cs: '不符合'
          },
          { value: 30, name: '专精特新小巨人',
            tooltip: {
              trigger: 'item',
              formatter: '{a} <br/>{b} : 不符合'
            }, cs: '不符合'
          }

        ]
      }
    ]
  }
  return option
}
export function getInnovateOption(edata) {
  const option = {
    title: {
      text: '创新型中小企业符合度分析\n',
      subtext: '',
      left: 'left',
      top: '5px',
      bottom: '5px',
      textStyle: {
        color: '#333333'
      }
    },
    legend: {
      data: ['满分', '企业评分'],
      bottom: '0px'
    },
    tooltip: {
      show: true,
      trigger: 'item'
    },
    // legend: {
    //   type: 'scroll',
    //   bottom: 10,
    //   data: ['创新能力（40分）']
    // },
    radar: {
      center: ['50%', '55%'],
      radius: '60%',
      startAngle: 90,
      splitNumber: 6,
      shape: 'circle',
      name: {
        textStyle: {
          color: '#409eff',
          fontSize: '12',
          borderRadius: 3,
          padding: [3, 5]
        }
      },
      splitArea: {
        areaStyle: {
          color: ['#030C5700']
        }
      },
      axisLabel: {
        show: false,
        fontSize: 18,
        color: '#78C5EC',
        fontStyle: 'normal',
        fontWeight: 'normal'
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: '#6885D188'//
        }
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: '#6885D100'//
        }
      },
      indicator: [{
        'name': '创新能力（40分）',
        'max': 40
      }, {
        'name': '专业化（30分）',
        'max': 30
      }, {
        'name': '成长性（30分）',
        'max': 30
      }]
    },
    series: [{
      name: '评分',
      type: 'radar',
      symbol: 'circle',
      symbolSize: 6,
      areaStyle: {
        normal: {
          color: '#07a0ff'
        }
      },
      itemStyle: {
        borderWidth: 0,
        color: '#07a0ff'
      },
      lineStyle: {
        normal: {
          color: '#07a0ff',
          width: 2
        }
      },
      data: [
        { value: [40, 30, 30],
          name: '满分',
          areaStyle: {
            color: 'rgba(0,174,255,0.3)'
          },
          itemStyle: {
            borderWidth: 0,
            color: 'rgba(0,174,255,0.3)'
          },
          lineStyle: {
            normal: {
              color: 'rgba(0,174,255,0.3)',
              width: 2
            }}
        },
        { value: edata,
          name: '企业评分',
          areaStyle: {
            color: '#07a0ff'
          },
          itemStyle: {
            borderWidth: 0,
            color: '#07a0ff'
          },
          lineStyle: {
            normal: {
              color: '#07a0ff',
              width: 2
            }}
        }
      ]
    }]
  }
  return option
}
export function getRefinementOption(edata) {
  const option = {
    title: {
      text: '专精特新中小企业符合度分析\n',
      subtext: '',
      left: 'left',
      top: '5px',
      bottom: '5px',
      textStyle: {
        color: '#333333'
      }
    },
    legend: {
      data: ['满分', '企业评分'],
      bottom: '0px'
    },
    tooltip: {
      show: true,
      trigger: 'item'
    },
    radar: {
      center: ['50%', '55%'],
      radius: '47%',
      startAngle: 90,
      splitNumber: 6,
      shape: 'circle',
      name: {
        textStyle: {
          color: '#409eff',
          fontSize: '12',
          borderRadius: 3,
          padding: [3, 5]
        }
      },
      splitArea: {
        areaStyle: {
          color: ['#030C5700']
        }
      },
      axisLabel: {
        show: false,
        fontSize: 18,
        color: '#78C5EC',
        fontStyle: 'normal',
        fontWeight: 'normal'
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: '#6885D188'//
        }
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: '#6885D100'//
        }
      },
      indicator: [{
        'name': '专业化（25分）',
        'max': 25
      }, {
        'name': '创新能力（35分）',
        'max': 35
      }, {
        'name': '特色化（15分）',
        'max': 15
      }, {
        'name': '精细化（25分）',
        'max': 25
      }]
    },
    series: [{
      name: '得分',
      type: 'radar',
      symbol: 'circle',
      symbolSize: 6,
      areaStyle: {
        normal: {
          color: '#87f8ee'
        }
      },
      itemStyle: {
        borderWidth: 0,
        color: '#63f8ed'
      },
      lineStyle: {
        normal: {
          color: '#63f8ed',
          width: 2
        }
      },
      data: [
        { value: [25, 35, 15, 25],
          name: '满分',
          areaStyle: {
            color: 'rgba(0,174,255,0.3)'
          },
          itemStyle: {
            borderWidth: 0,
            color: 'rgba(0,174,255,0.3)'
          },
          lineStyle: {
            normal: {
              color: 'rgba(0,174,255,0.3)',
              width: 2
            }}
        },
        { value: edata,
          name: '企业评分',
          areaStyle: {
            color: '#07a0ff'
          },
          itemStyle: {
            borderWidth: 0,
            color: '#07a0ff'
          },
          lineStyle: {
            normal: {
              color: '#07a0ff',
              width: 2
            }}
        }
      ]
    }]
  }
  return option
}
export function getGiantOption(edata) {
  const option = {
    title: {
      text: '专精特新小巨人符合度分析\n',
      subtext: '',
      left: 'left',
      top: '5px',
      bottom: '5px',
      textStyle: {
        color: '#333333'
      }
    },
    legend: {
      data: ['满分', '企业评分'],
      bottom: '0px'
    },
    tooltip: {
      show: true,
      trigger: 'item'
    },
    radar: {
      center: ['50%', '50%'],
      radius: '55%',
      startAngle: 90,
      splitNumber: 6,
      shape: 'circle',
      name: {
        textStyle: {
          color: '#409eff',
          fontSize: '12',
          borderRadius: 3,
          padding: [3, 5]
        }
      },
      splitArea: {
        areaStyle: {
          color: ['#030C5700']
        }
      },
      axisLabel: {
        show: false,
        fontSize: 18,
        color: '#78C5EC',
        fontStyle: 'normal',
        fontWeight: 'normal'
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: '#6885D188'//
        }
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: '#6885D100'//
        }
      },
      indicator: [{
        'name': '专业化',
        'max': 3
      }, {
        'name': '主导产品所属领域',
        'max': 1
      }, {
        'name': '产业链配套',
        'max': 1
      }, {
        'name': '创新能力',
        'max': 5
      }, {
        'name': '特色化',
        'max': 2
      }, {
        'name': '精细化',
        'max': 5
      }]
    },
    series: [{
      name: '测评得分',
      type: 'radar',
      symbol: 'circle',
      symbolSize: 6,
      areaStyle: {
        normal: {
          color: '#87f8ee'
        }
      },
      itemStyle: {
        borderWidth: 0,
        color: '#63f8ed'
      },
      lineStyle: {
        normal: {
          color: '#63f8ed',
          width: 2
        }
      },
      data: [
        { value: [3, 1, 1, 5, 2, 5],
          name: '满分',
          areaStyle: {
            color: 'rgba(0,174,255,0.3)'
          },
          itemStyle: {
            borderWidth: 0,
            color: 'rgba(0,174,255,0.3)'
          },
          lineStyle: {
            normal: {
              color: 'rgba(0,174,255,0.3)',
              width: 2
            }}
        },
        { value: edata,
          name: '企业评分',
          areaStyle: {
            color: '#07a0ff'
          },
          itemStyle: {
            borderWidth: 0,
            color: '#07a0ff'
          },
          lineStyle: {
            normal: {
              color: '#07a0ff',
              width: 2
            }}
        }

      ]
    }]
  }
  return option
}
export function getOverallOption(edata) {
  const option = {
    title: {
      text: '专精特新发展评分\n',
      subtext: '',
      left: 'left',
      top: '5px',
      bottom: '5px',
      textStyle: {
        color: '#333333'
      }
    },
    series: [
      {
        type: 'gauge',
        startAngle: 180,
        endAngle: 0,
        center: ['50%', '65%'],
        axisLine: {
          lineStyle: {
            width: 30,
            color: [
              [0.1, '#0dfefd'],
              [0.2, '#00fffd'],
              [0.3, '#0afbff'],
              [0.4, '#04edfd'],
              [0.5, '#05e8ff'],
              [0.6, '#00d8fc'],
              [0.7, '#4ec0fb'],
              [0.8, '#07a0ff'],
              [0.9, '#5288ff'],
              [1, '#1e4fa6']
              // color: [
              //   [0.1, '#194f97'],
              //   [0.2, '#f19272'],
              //   [0.3, '#bd6b08'],
              //   [0.4, '#00686b'],
              //   [0.5, '#c82d31'],
              //   [0.6, '#625ba1'],
              //   [0.7, '#103667'],
              //   [0.8, '#9c9800'],
              //   [0.9, '#f19272'],
              //   [1, '#a195c5']
              // [0.1, '#d2c0bf'],
              // [0.2, '#d29e9c'],
              // [0.3, '#c45754'],
              // [0.4, '#c23631'],
              // [0.5, '#7bb5df'],
              // [0.6, '#557891'],
              // [0.7, '#304554'],
              // [0.8, '#b7f4fb'],
              // [0.9, '#82b9c0'],
              // [1, '#60a0a8']

            ]
          }
        },
        pointer: {
          itemStyle: {
            color: 'inherit'
          }
        },
        axisTick: {
          distance: 100,
          length: 8,
          lineStyle: {
            color: '#fff',
            width: 0
          }
        },
        splitLine: {
          distance: 0,
          length: 30,
          lineStyle: {
            color: '#fff',
            width: 4
          }
        },
        axisLabel: {
          color: 'inherit',
          distance: 5,
          fontSize: 13
        },
        detail: {
          show: true,
          valueAnimation: true,
          formatter: '总体水平：{value} 分',
          color: '#c23631'
        },
        data: [
          {
            value: edata
          }
        ]
      }
    ]
  }
  return option
}
export function getZjtxzspfOption(edata, adata) {
  const option = {
    title: {
      text: '专精特新发展雷达图\n',
      subtext: '',
      left: 'left',
      top: '5px',
      bottom: '5px',
      textStyle: {
        color: '#333333'
      }
    },
    color: ['#194f97', '#f19272', '#c82d31'],
    tooltip: {
      show: true,
      trigger: 'item'
    },
    legend: {
      data: ['满分', '测评得分', '平均值'],
      bottom: '0px'
    },
    radar: {
      center: ['50%', '55%'],
      radius: '50%',
      startAngle: 90,
      splitNumber: 6,
      shape: 'circle',
      name: {
        textStyle: {
          color: '#237eff',
          fontSize: '12',
          borderRadius: 3,
          padding: [3, 5]
        }
      },
      splitArea: {
        areaStyle: {
          color: ['#030C5700']
        }
      },
      axisLabel: {
        show: false,
        fontSize: 18,

        fontStyle: 'normal',
        fontWeight: 'normal'
      },
      axisLine: {
        show: true,
        lineStyle: {

        }
      },
      splitLine: {
        show: false,
        lineStyle: {
        }
      },
      indicator: [{
        'name': '基础能力',
        'max': 25
      }, {
        'name': '高质量发展',
        'max': 20
      }, {
        'name': '创新能力',
        'max': 20
      }, {
        'name': '特色化',
        'max': 10
      }, {
        'name': '精细化',
        'max': 10
      }, {
        'name': '专业化',
        'max': 15
      }]
    },
    series: [{
      name: '测评结果',
      type: 'radar',
      symbol: 'circle',
      symbolSize: 6,
      areaStyle: {
        normal: {
          color: '#07a0ff'
        }
      },
      itemStyle: {
        borderWidth: 0,
        color: '#07a0ff'
      },
      lineStyle: {
        normal: {
          color: '#07a0ff',
          width: 2
        }
      },
      data: [
        { value: [25, 20, 20, 10, 10, 15],
          name: '满分',
          areaStyle: {
            color: 'rgba(0,174,255,0.3)'
          },
          itemStyle: {
            borderWidth: 0,
            color: 'rgba(0,174,255,0.3)'
          },
          lineStyle: {
            normal: {
              color: 'rgba(0,174,255,0.3)',
              width: 2
            }
          }
        },
        { value: adata,
          name: '平均值',
          areaStyle: {
            color: '#237eff88'
          },
          itemStyle: {
            borderWidth: 0,
            color: '#237eff'
          },
          lineStyle: {
            normal: {
              color: '#237eff',
              width: 2
            }
          }},
        {
          value: edata,
          name: '测评得分',
          areaStyle: {
            color: '#07a0ff'
          },
          itemStyle: {
            borderWidth: 0,
            color: '#07a0ff'
          },
          lineStyle: {
            normal: {
              color: '#07a0ff',
              width: 2
            }
          }
        }
      ]
    }]
  }
  return option
}
export function getBaseOption(edata, adata) {
  const option = {
    title: {
      text: '基础能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '25'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      max: 1, // only the largest 3 bars will be displayed
      axisLabel: {
        show: true,
        fontSize: 14 }
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
export function getCharacteristicOption(edata, adata) {
  const option = {
    title: {
      text: '特色化能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '10'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      axisLabel: {
        show: true,
        fontSize: 14 },
      max: 1 // only the largest 3 bars will be displayed
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
export function getDevelopOption(edata, adata) {
  const option = {
    title: {
      text: '高质量发展能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '20'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      axisLabel: {
        show: true,
        fontSize: 14 },
      max: 1 // only the largest 3 bars will be displayed
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
export function getInnovationOption(edata, adata) {
  const option = {
    title: {
      text: '创新能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '20'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      axisLabel: {
        show: true,
        fontSize: 14 },
      max: 1 // only the largest 3 bars will be displayed
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
export function getProfessionlOption(edata, adata) {
  const option = {
    title: {
      text: '专业化能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '15'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      axisLabel: {
        show: true,
        fontSize: 14 },
      max: 1 // only the largest 3 bars will be displayed
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
export function getRefineOption(edata, adata) {
  const option = {
    title: {
      text: '精细化能力分析\n',
      subtext: '',
      left: 'left',
      top: '25px',
      bottom: '25px',
      textStyle: {
        color: '#333333'
      }
    },
    grid: {
      top: 80,
      bottom: 30,
      left: 250,
      right: 180
    },
    xAxis: {
      max: '10'
    },
    yAxis: {
      type: 'category',
      data: ['企业评分', '企业与本地区平均分比较'],
      inverse: true,
      animationDuration: 300,
      animationDurationUpdate: 300,
      axisLabel: {
        show: true,
        fontSize: 14 },
      max: 1 // only the largest 3 bars will be displayed
    },
    series: [
      {
        realtimeSort: true,
        name: 'X',
        type: 'bar',
        data: [edata, adata],
        itemStyle: {
          color: '#1f4fa6'
        },
        label: {
          show: true,
          position: 'right',
          valueAnimation: true
        }
      }
    ],
    // legend: {
    //   show: true
    // },
    animationDuration: 0,
    animationDurationUpdate: 3000,
    animationEasing: 'linear',
    animationEasingUpdate: 'linear'
  }
  return option
}
